.TH "/Users/matthieuriolo/Downloads/libgenc/branches/riolo/trunk/include/priority_queue.h" 3 "Wed Jan 11 2012" ""c generic library"" \" -*- nroff -*-
.ad l
.nh
.SH NAME
/Users/matthieuriolo/Downloads/libgenc/branches/riolo/trunk/include/priority_queue.h \- 
.SH SYNOPSIS
.br
.PP
\fC#include 'gen/data_types.h'\fP
.br
\fC#include 'gen/gen_macros.h'\fP
.br
\fC#include 'gen/function_signatures.h'\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fB_prio_queue_node\fP"
.br
.ti -1c
.RI "struct \fB_prio_queue\fP"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef struct \fB_prio_queue_node\fP \fBPrioNode\fP"
.br
.ti -1c
.RI "typedef struct \fB_prio_queue\fP \fBPrioQueue\fP"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBCOMMON_FUNCTION_PROTOTYPES\fP (\fBPrioQueue\fP) int8_t insert_PrioQueue(\fBPrioQueue\fP *\fBobj\fP"
.br
.ti -1c
.RI "void * \fBtop_data_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP)"
.br
.RI "\fIretrieves the data of the top item in the queue \fP"
.ti -1c
.RI "int32_t \fBtop_prio_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP)"
.br
.RI "\fIretrieves the priority of the top item in the queue \fP"
.ti -1c
.RI "int8_t \fBpop_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP)"
.br
.RI "\fIpops the item that is at the top of the queue \fP"
.ti -1c
.RI "int8_t \fBinc_prio_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP, int32_t amt, void *\fBdata\fP, size_t \fBdatasize\fP)"
.br
.RI "\fIincrement the priority of the given data \fP"
.ti -1c
.RI "int8_t \fBdec_prio_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP, int32_t amt, void *\fBdata\fP, size_t \fBdatasize\fP)"
.br
.RI "\fIdecrement the priority of the given data \fP"
.ti -1c
.RI "int32_t \fBfind_prio_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP, void *\fBdata\fP, size_t \fBdatasize\fP)"
.br
.ti -1c
.RI "int8_t \fBresize_PrioQueue\fP (\fBPrioQueue\fP *\fBobj\fP, size_t size)"
.br
.RI "\fIResizes the Priority Queue. \fP"
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "int32_t \fBpriority\fP"
.br
.ti -1c
.RI "int32_t void * \fBdata\fP"
.br
.ti -1c
.RI "int32_t void size_t \fBdatasize\fP"
.br
.in -1c
.SH "Typedef Documentation"
.PP 
.SS "typedef struct \fB_prio_queue_node\fP  \fBPrioNode\fP"
.SS "typedef struct \fB_prio_queue\fP  \fBPrioQueue\fP"
.SH "Function Documentation"
.PP 
.SS "COMMON_FUNCTION_PROTOTYPES (\fBPrioQueue\fP)"\fBParameters:\fP
.RS 4
\fIobj\fP the object to insert the items in 
.br
\fIpriority\fP the priority of the data 
.br
\fIdata\fP the data to be inserted 
.br
\fIdatasize\fP the size of the data 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, non-zero on error 
.RE
.PP

.SS "int8_t dec_prio_PrioQueue (\fBPrioQueue\fP * obj, int32_t amt, void * data, size_t datasize)"
.PP
decrement the priority of the given data \fBParameters:\fP
.RS 4
\fIobj\fP the object that contains the data 
.br
\fIamt\fP the amount to decrement the priority by 
.br
\fIdata\fP the data to decrease priority of 
.br
\fIdatasize\fP the size of the data 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, non-zero on error 
.RE
.PP

.PP
Definition at line 168 of file priority_queue.c.
.SS "int32_t find_prio_PrioQueue (\fBPrioQueue\fP * obj, void * data, size_t datasize)"
.PP
Definition at line 183 of file priority_queue.c.
.SS "int8_t inc_prio_PrioQueue (\fBPrioQueue\fP * obj, int32_t amt, void * data, size_t datasize)"
.PP
increment the priority of the given data \fBParameters:\fP
.RS 4
\fIobj\fP the object that contains the data 
.br
\fIamt\fP the amount to increment the priority by 
.br
\fIdata\fP the data to increase the priority of 
.br
\fIdatasize\fP the size of the data 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, non-zero on error 
.RE
.PP

.PP
Definition at line 153 of file priority_queue.c.
.SS "int8_t pop_PrioQueue (\fBPrioQueue\fP * obj)"
.PP
pops the item that is at the top of the queue \fBParameters:\fP
.RS 4
\fIobj\fP the object to pop the top item off of 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, non-zero on error 
.RE
.PP

.PP
Definition at line 148 of file priority_queue.c.
.SS "int8_t resize_PrioQueue (\fBPrioQueue\fP * obj, size_t size)"
.PP
Resizes the Priority Queue. \fBParameters:\fP
.RS 4
\fIobj\fP the object to resize 
.br
\fIize\fP the size to resize the object to 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on success, non-zero on error 
.RE
.PP

.PP
Definition at line 197 of file priority_queue.c.
.SS "void* top_data_PrioQueue (\fBPrioQueue\fP * obj)"
.PP
retrieves the data of the top item in the queue \fBParameters:\fP
.RS 4
\fIobj\fP the object to retrieve the data of 
.RE
.PP
\fBReturns:\fP
.RS 4
data of the top item or NULL on error 
.RE
.PP

.PP
Definition at line 132 of file priority_queue.c.
.SS "int32_t top_prio_PrioQueue (\fBPrioQueue\fP * obj)"
.PP
retrieves the priority of the top item in the queue \fBParameters:\fP
.RS 4
\fIobj\fP the object to retrieve the top priority of 
.RE
.PP
\fBReturns:\fP
.RS 4
priority of top object or INT_MIN on error 
.RE
.PP

.PP
Definition at line 140 of file priority_queue.c.
.SH "Variable Documentation"
.PP 
.SS "int32_t void* \fBdata\fP"
.PP
Definition at line 39 of file priority_queue.h.
.SS "int32_t void size_t \fBdatasize\fP"
.PP
Definition at line 39 of file priority_queue.h.
.SS "int32_t \fBpriority\fP"
.PP
Definition at line 39 of file priority_queue.h.
.SH "Author"
.PP 
Generated automatically by Doxygen for 'c generic library' from the source code.
